package org.uned.agonzalo16.bitacora.web.tag;

import java.io.Serializable;
import java.util.Date;

import org.uned.agonzalo16.bitacora.domain.Article;

@SuppressWarnings("serial")
public class FeaturedArticle implements Serializable {

	private Long id;
	private Date creationDate;
	private String title;
	private String author;
	private int commentCount;

	public FeaturedArticle() {
	}

	public FeaturedArticle(Article article, int commentCount) {
		this.id = article.getId();
		this.creationDate = article.getCreationDate();
		this.title = article.getTitle();
		this.author = article.getUser().getUsername();
		this.commentCount = commentCount;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public void setCommentCount(int commentCount) {
		this.commentCount = commentCount;
	}

	public Long getId() {
		return id;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public String getTitle() {
		return title;
	}

	public String getAuthor() {
		return author;
	}

	public int getCommentCount() {
		return commentCount;
	}
}
